package com.jml.装饰模式实现三级缓存.component.impl;


import com.jml.装饰模式实现三级缓存.component.ComponentCache;
import java.util.HashMap;
import java.util.Map;

/**
 * @author:jml
 * @date: 2019/9/9 14:01
 * @description：一级缓存
 */
public class OneLevelCacheComponent implements ComponentCache {

    Map oneCacheMap = new HashMap();

    public OneLevelCacheComponent() {
        oneCacheMap.put("jml","666");
    }

    @Override
    public Object getCache(String key) {
        Object value = oneCacheMap.get(key);
        System.out.println(">>>调用一级缓存查询");
        return value;
    }

    @Override
    public void putCache(String key,Object value) {

    }
}
